<html xmlns:th="http://www.thymeleaf.org">
<div id="updateUser" style="margin-top: 12px;margin-right: 23px;">
    <form class="layui-form" action="/user/settle/" method="post">

        <input type="hidden" name="userId" th:value="${userDo.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">推广量</label>
            <div class="layui-input-block">
                <input type="number" name="settleCount" onkeyup="NumberCheck(this)" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">结算方式</label>
            <div class="layui-input-block">
                <select name="type" lay-filter="productNameList" lay-verify="required">
                    <option></option>
                    <option value="1">立刻发布</option>
                    <option value="2">定时推送</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" id="formSubmit" lay-submit="" lay-filter="demo1" style="margin-left: 45px;">立即提交</button>
            </div>
        </div>
    </form>

</div>


<script type="text/javascript">


    layui.use(['form', 'laydate'], function () {
        var form = layui.form
            , laydate = layui.laydate
            , $ = layui.jquery

        form.render();


        form.on('select(productNameList)', function (data) {

        })
    })


    function NumberCheck(t){
        var num = t.value;
        var re=/^\d*$/;
        if(!re.test(num)){
            isNaN(parseInt(num))?t.value=0:t.value=parseInt(num);
        }
    }


</script>

</html>
